<!--{eval $pageview = '<a href="home.php?mod=space&username=' .$space[username] . '&do=home">' . lang("home/template","feed") . '</a>';}-->
<!--{template home/space_header}-->
<!--{template home/space_site_left}-->
<div style="padding-left:10px;">
<!--{subtemplate home/space_short_profile}-->
</div>
<div class="bm z"  style="width:770px;">
    <div class="xld xlda mtm">
        <dl class="cl">
            <dd class="m avt">
                <!--{if $value[uid]}-->
                    <a href="home.php?mod=space&uid=$value[uid]" c="1"><!--{avatar($value[uid],small)}--></a>
                    <!--p><a href="home.php?mod=space&uid=$value[uid]" title="$value[username]">$value[username]</a></p -->
                <!--{else}-->
                    <img src="{IMGDIR}/systempm.png" width="48" height="48" alt="" />
                <!--{/if}-->
            </dd>
            <dd class="cl dd">
                <ul class="el">
                    <!--{eval $autoloaddisable = true;}-->
                    <!--{template home/space_feed_li}-->
                </ul>
            </dd>
        </dl>
        <!-- Begin Comment -->
        <div class="cmt hcmd">
        <i class="x-nhot"></i>
        <div class="xld xlda">
            <h3 class="ptn pbn bbs ">
                <!--{if $_G['uid']}-->
                <a href="home.php?mod=space&uid=$space[uid]&do=$do&id=$fid#quickcommentform_{$fid}" onclick="if($('commentfeed_message')){$('commentfeed_message').focus();return false;}" class="y xi2 xw0">{lang publish_comment}</a>
                <!--{/if}-->
                {lang comment} (<span id="comment_replynum">$count</span> {lang blog_replay})
            </h3>
        </div>
        <div id="div_main_content" class="mbm">
            <div id="comment_ul" class="xld xlda">
            <!--{eval $lastcid = 0;}-->
            <!--{loop $list_comment $k $value}-->
                <!--{template home/space_comment_li}-->
                <!--{eval $lastcid = $value['cid'];}-->
            <!--{/loop}-->
            </div>
        </div>
        <!--{if !$blog[noreply] && $_G['uid']}-->
        <table cellpadding="0" width="100%">
            <tr>
                <td valign="top" width="50px">
                    <div class="avt">
                        <a href="home.php?mod=space&uid=$_G['uid']" class="avt_l" c="1">
                            <!--{avatar($_G['uid'],small)}-->
                        </a>
                    </div>
                </td>
                <td width="*">
        <form id="quickcommentformfeed_{$fid}" action="home.php?mod=spacecp&ac=comment" method="post" autocomplete="off" onsubmit="ajaxpost('quickcommentformfeed_{$fid}', 'return_qcfeed_$fid');doane(event);">
         <p>
            <span id="comment_face" title="{lang insert_emoticons}"  onclick="showFace(this.id, 'commentfeed_message');return false;" class="cur1"><img src="{IMGDIR}/facelist.gif" alt="facelist" class="vm" /></span>
            <!--{hook/space_album_face_extra}-->
            <!--{if $_G['setting']['magicstatus'] && !empty($_G['setting']['magics']['doodle'])}-->
            <a id="a_magic_doodle" href="home.php?mod=magic&mid=doodle&showid=comment_doodle&target=commentfeed_message" onclick="showWindow(this.id, this.href, 'get', 0)"><img src="{STATICURL}image/magic/doodle.small.gif" alt="doodle" class="vm" title="$_G['setting']['magics']['doodle']" /></a>
            <!--{/if}-->
        </p>
        <textarea id="commentfeed_message" onkeydown="ctrlEnter(event, 'commentfeedsubmit_btn');  resizeTx(this);" onfocus="txtTxCommentChk(this.id, 1)" onblur="onckeydown=true; resizeTx(this); txtTxCommentChk(this.id, 2)" name="message" rows="1"  class="pts"  style="color:#CCC;">Viết bình luận...</textarea>
        <!--{if checkperm('seccode') && ($secqaacheck || $seccodecheck)}-->
            <!--{block sectpl}--><sec> <span id="sec<hash>" onclick="showMenu(this.id);"><sec></span><div id="sec<hash>_menu" class="p_pop p_opt" style="display:none"><sec></div><!--{/block}-->
            <div class="mtm mbm sec"><!--{subtemplate common/seccheck}--></div>
        <!--{/if}-->
        <p class="pns">
               	<input type="hidden" name="commentsubmit" value="true" />
                <input type="hidden" name="id" value="$fid" />
                <input type="hidden" name="idtype" value="$value['idtype']" />
                <span id="return_qcfeed_{$fid}"></span>
                <input type="hidden" name="referer" value="home.php?mod=space&uid=$space[uid]&do=$do&id=$id" />
                <input type="hidden" name="formhash" value="{FORMHASH}" />
                <input type="hidden" name="quickcomment" value="1" />
                <input type="hidden" name="handlekey" value="qcfeed_{$fid}" />
                <button type="submit" name="commentfeedsubmit_btn" value="true" id="commentfeedsubmit_btn" style="display:none" class="pn"{if !$_G[uid]} onclick="showWindow(this.id, this.form.action);return false;"{/if}><strong>{lang comment}</strong></button>
                <span id="return_qcfeed_{$fid}"></span>
            </p>
            <input type="hidden" name="formhash" value="{FORMHASH}" />
        </form>
        </td>
            </tr>
        </table>
        <!--{/if}-->
     <!--{if $multi}--><div class="pgs cl mbm">$multi</div><!--{/if}-->
</div>
<script type="text/javascript">
	var $value['idtype']_lastcid	= $lastcid;
	var $value['idtype']_id		= $fid;
	var autoloadfeedcmnew_$fid = null;
	
	function _autoloadfeedcmnew_$fid(){
		return setInterval(function(){comment_autoload('comment_ul', "{$value['idtype']}");}, 10000);
	}
	jQuery(document).ready(function(){
		autoloadfeedcmnew_$fid = _autoloadfeedcmnew_$fid();
	});
	
	function succeedhandle_qcfeed_{$fid}(url, msg, values) {
		if(values['cid']) {
			if($('commentfeed_message')) {
				$('commentfeed_message').value= '';
			}
			autoloadfeedcmnew_$fid = window.clearInterval(autoloadfeedcmnew_$fid);
			comment_autoload('comment_ul', "{$value['idtype']}");
			autoloadfeedcmnew_$fid = _autoloadfeedcmnew_$fid();
			setTimeout(function(){
				$('return_qcfeed_{$fid}').innerHTML = '';
			}, 3000);
		} else {
			$('return_qcfeed_{$fid}').innerHTML = msg;
		}
		<!--{if checkperm('seccode') && $sechash}-->
			<!--{if $secqaacheck}-->
			updatesecqaa('$sechash');
			<!--{/if}-->
			<!--{if $seccodecheck}-->
			updateseccode('$sechash');
			<!--{/if}-->
		<!--{/if}-->
	}
</script>

            <!-- End Comment-->
        </div>
</div>
<div class="y column" style="width:225px;">
<!--{subtemplate common/ads_right}-->
</div>
<!--{template home/space_site_right}-->
<!--{template common/footer}-->